#!/usr/bin/env python
# -*- coding: UTF-8 -*-
'''
@Project ：图灵学习 
@File    ：3.下载静态资源.py
@IDE     ：PyCharm 
@Author  ：ChenLiGao
@Date    ：2024-11-19 11:25
'''
import requests

url = "https://www.baidu.com/img/bd_logo1.png"

# 在网络中获取图片的二进制数据
response = requests.get(url)
print(response.content)

# 将获取到的二进制数据写入到本地
with open("3baidu_login.png", mode="wb") as f:
    f.write(response.content)